package com.ruoyi.merchant.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.merchant.mapper.MerchantApplicationMapper;
import com.ruoyi.merchant.domain.MerchantApplication;
import com.ruoyi.merchant.service.IMerchantApplicationService;

/**
 * 商家入驻申请Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-21
 */
@Service
public class MerchantApplicationServiceImpl implements IMerchantApplicationService 
{
    @Autowired
    private MerchantApplicationMapper merchantApplicationMapper;

    /**
     * 查询商家入驻申请
     * 
     * @param applicationId 商家入驻申请主键
     * @return 商家入驻申请
     */
    @Override
    public MerchantApplication selectMerchantApplicationByApplicationId(Long applicationId)
    {
        return merchantApplicationMapper.selectMerchantApplicationByApplicationId(applicationId);
    }

    /**
     * 查询商家入驻申请列表
     * 
     * @param merchantApplication 商家入驻申请
     * @return 商家入驻申请
     */
    @Override
    public List<MerchantApplication> selectMerchantApplicationList(MerchantApplication merchantApplication)
    {
        return merchantApplicationMapper.selectMerchantApplicationList(merchantApplication);
    }

    /**
     * 新增商家入驻申请
     * 
     * @param merchantApplication 商家入驻申请
     * @return 结果
     */
    @Override
    public int insertMerchantApplication(MerchantApplication merchantApplication)
    {
        return merchantApplicationMapper.insertMerchantApplication(merchantApplication);
    }

    /**
     * 修改商家入驻申请
     * 
     * @param merchantApplication 商家入驻申请
     * @return 结果
     */
    @Override
    public int updateMerchantApplication(MerchantApplication merchantApplication)
    {
        return merchantApplicationMapper.updateMerchantApplication(merchantApplication);
    }

    /**
     * 批量删除商家入驻申请
     * 
     * @param applicationIds 需要删除的商家入驻申请主键
     * @return 结果
     */
    @Override
    public int deleteMerchantApplicationByApplicationIds(Long[] applicationIds)
    {
        return merchantApplicationMapper.deleteMerchantApplicationByApplicationIds(applicationIds);
    }

    /**
     * 删除商家入驻申请信息
     * 
     * @param applicationId 商家入驻申请主键
     * @return 结果
     */
    @Override
    public int deleteMerchantApplicationByApplicationId(Long applicationId)
    {
        return merchantApplicationMapper.deleteMerchantApplicationByApplicationId(applicationId);
    }
}
